

var imgSrc=''

 	if(localStorage.bgSrc){
		imgSrc=localStorage.bgSrc
		$(".selectSkin option").eq(localStorage.value).attr('selected',true)
	}else{
		imgSrc='static/img/index_bg.jpg'
		$(".selectSkin option").eq(0).attr('selected',true)
	}

$(".bgImg").attr('src',imgSrc)

$(".selectSkin").change(function(){
	if($(this).val()==1){
		localStorage.setItem("bgSrc", "static/img/bgImg/1.jpg");
		localStorage.setItem("value", "1");
		localStorage.setItem("skinCss", "static/css/skinCss/skin1.css");
		$(".bgImg").attr('src','static/img/bgImg/1.jpg')
	}else if($(this).val()==0){
		localStorage.setItem("bgSrc", "static/img/index_bg.jpg");
		localStorage.setItem("value", "0");
		localStorage.setItem("skinCss", "static/css/skinCss/skin0.css");
		$(".bgImg").attr('src',"static/img/index_bg.jpg")
	}
	
})

